skia-gcc-no-musttail
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Wed, 28 Jan 2026 20:03:25 +0000 (21:03 +0100)
committerRene Engelhard <rene@debian.org>
Wed, 28 Jan 2026 20:03:25 +0000 (21:03 +0100)
Gbp-Pq: Name skia-gcc-no-musttail.diff

external/skia/UnpackedTarball_skia.mk
external/skia/gcc-no-musttail.diff [new file with mode: 0644]

index 692eba0130e58188c4fa817718a780bec4c5cb1b..2552ef7f36f44bc4f05bddf64e75bd8c19b08f18 100644 (file)
@@ -44,6 +44,7 @@ skia_patches := \
        0004-loong64-Fix-the-remaining-implicit-vector-casts.patch \
     msvc-unknown-attributes.patch.1 \
        fix-semaphore-include.patch.1 \
+       gcc-no-musttail.diff \
 
 ifneq ($(MSYSTEM),)
 # use binary flag so patch from git-bash won't choke on mixed line-endings in patches
diff --git a/external/skia/gcc-no-musttail.diff b/external/skia/gcc-no-musttail.diff
new file mode 100644 (file)
index 0000000..c08c6b6
--- /dev/null
@@ -0,0 +1,33 @@
+diff -urN skia-old/modules/skcms/src/skcms_internals.h skia/modules/skcms/src/skcms_internals.h
+--- skia-old/modules/skcms/src/skcms_internals.h       2025-11-13 07:45:02.000000000 +0100
++++ skia/modules/skcms/src/skcms_internals.h   2025-11-30 12:05:23.846221957 +0100
+@@ -53,13 +53,16 @@
+                                                  && !defined(__riscv) \
+                                                  && !defined(__powerpc__) \
+                                                  && !defined(__loongarch__) \
++                                                 && !defined(__alpha__) \
+                                                  && !defined(_WIN32) && !defined(__SYMBIAN32__)
+             #define SKCMS_HAS_MUSTTAIL 1
+         #endif
+     #elif defined(__GNUC__) && !defined(SKCMS_HAS_MUSTTAIL)
+         // GCC on riscv64 does not support our tail call functions
+         // cf. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121784
+-        #if __has_cpp_attribute(clang::musttail) && !defined(__riscv)
++      // copy the rest over from the clang case, just in case we ever built with
++      // gcc for them (which we do for alpha right now)
++        #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && !defined(__riscv) && !defined (__powerpc__) && !defined(__loongarch__) && !defined (__alpha__)
+             #define SKCMS_HAS_MUSTTAIL 1
+         #else
+             #define SKCMS_HAS_MUSTTAIL 0
+diff -Nru skia-old/src/core/SkRasterPipeline.h skia/src/core/SkRasterPipeline.h
+--- skia-old/src/core/SkRasterPipeline.h        2025-11-13 07:45:03.000000000 +0100
++++ skia/src/core/SkRasterPipeline.h    2025-12-08 17:01:58.882479397 +0100
+@@ -27,7 +27,7 @@
+ struct skcms_TransferFunction;
+ #if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
+-        !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && \
++        !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && !defined(__alpha__) && \
+         !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK))
+     // [[clang::musttail]] is disabled for the Android version of Skia running on Windows as it
+     // causes crashes (This is probably related to http://crbug.com/1505442).